package com.fs.domain;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠券管理对象 activity
 *
 * @author zh
 * @date 2024-10-18
 */
public class ActivityCoupon extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 活动id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "活动id")
    private BigInteger id;

    /**
     * 活动名称
     */
    @Excel(name = "活动名称")
    private String name;

    /**
     * 优惠券类型ID，1：满减，2：折扣
     */
    @Excel(name = "优惠券类型ID，1：满减，2：折扣")
    private Integer typeId;

    /**
     * 优惠金额，满减或无门槛的优惠金额
     */
    @Excel(name = "优惠金额，满减或无门槛的优惠金额")
    private BigDecimal discountAmount;

    /**
     * 折扣率，折扣类型的折扣率，8折就是存80
     */
    @Excel(name = "折扣率，折扣类型的折扣率，8折就是存80")
    private Integer discountRate;

    /**
     * 使用范围
     */
    @Excel(name = "使用范围")
    private String scopeUse;

    /**
     * 适用对象
     */
    @Excel(name = "适用对象")
    private String applicableObjects;

    /**
     * 优惠券有效期天数，0：表示有效期是指定有效期的
     */
    @Excel(name = "优惠券有效期天数，0：表示有效期是指定有效期的")
    private Integer validityDays;

    /**
     * 发放开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发放开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date distributeStartTime;

    /**
     * 发放结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发放结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date distributeEndTime;

    /**
     * 发放数量，0：表示无限量，其他正数表示最大发放量
     */
    @Excel(name = "发放数量，0：表示无限量，其他正数表示最大发放量")
    private Integer totalNum;

    /**
     * 库存
     */
    @Excel(name = "库存")
    private Integer stockNum;

    /**
     * 活动状态，1：待生效，2：进行中，3：已失效 4：作废
     */
    @Excel(name = "活动状态，1：待生效，2：进行中，3：已失效 4：作废")
    private Integer status;

    /**
     * 逻辑删除
     */
    private Integer isDeleted;

    /**
     * $table.subTable.functionName信息
     */
    private List<CouponType> couponTypeList;

    public BigInteger getId() {
        return id;
    }

    public void setId(BigInteger id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setDiscountAmount(BigDecimal discountAmount) {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountRate(Integer discountRate) {
        this.discountRate = discountRate;
    }

    public Integer getDiscountRate() {
        return discountRate;
    }

    public void setScopeUse(String scopeUse) {
        this.scopeUse = scopeUse;
    }

    public String getScopeUse() {
        return scopeUse;
    }

    public void setApplicableObjects(String applicableObjects) {
        this.applicableObjects = applicableObjects;
    }

    public String getApplicableObjects() {
        return applicableObjects;
    }

    public void setValidityDays(Integer validityDays) {
        this.validityDays = validityDays;
    }

    public Integer getValidityDays() {
        return validityDays;
    }

    public void setDistributeStartTime(Date distributeStartTime) {
        this.distributeStartTime = distributeStartTime;
    }

    public Date getDistributeStartTime() {
        return distributeStartTime;
    }

    public void setDistributeEndTime(Date distributeEndTime) {
        this.distributeEndTime = distributeEndTime;
    }

    public Date getDistributeEndTime() {
        return distributeEndTime;
    }

    public void setTotalNum(Integer totalNum) {
        this.totalNum = totalNum;
    }

    public Integer getTotalNum() {
        return totalNum;
    }

    public void setStockNum(Integer stockNum) {
        this.stockNum = stockNum;
    }

    public Integer getStockNum() {
        return stockNum;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public List<CouponType> getCouponTypeList() {
        return couponTypeList;
    }

    public void setCouponTypeList(List<CouponType> couponTypeList) {
        this.couponTypeList = couponTypeList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("typeId", getTypeId())
                .append("discountAmount", getDiscountAmount())
                .append("discountRate", getDiscountRate())
                .append("scopeUse", getScopeUse())
                .append("applicableObjects", getApplicableObjects())
                .append("validityDays", getValidityDays())
                .append("distributeStartTime", getDistributeStartTime())
                .append("distributeEndTime", getDistributeEndTime())
                .append("totalNum", getTotalNum())
                .append("stockNum", getStockNum())
                .append("status", getStatus())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("isDeleted", getIsDeleted())
                .append("couponTypeList", getCouponTypeList())
                .toString();
    }
}
